home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGMISC
/
PCSSP.LZH
/
PC-SSP.ZIP
/
POLYOPS.ZIP
/
PNORM.FOR
< prev
next >
Wrap
Text File
|
1985-11-29
|
1KB
|
40 lines
C
C ..................................................................
C
C SUBROUTINE PNORM
C
C PURPOSE
C NORMALIZE COEFFICIENT VECTOR OF A POLYNOMIAL
C
C USAGE
C CALL PNORM(X,IDIMX,EPS)
C
C DESCRIPTION OF PARAMETERS
C X - VECTOR OF ORIGINAL COEFFICIENTS, ORDERED FROM
C SMALLEST TO LARGEST POWER. IT REMAINS UNCHANGED
C IDIMX - DIMENSION OF X. IT IS REPLACED BY FINAL DIMENSION
C EPS - TOLERANCE BELOW WHICH COEFFICIENT IS ELIMINATED
C
C REMARKS
C IF ALL COEFFICIENTS ARE LESS THAN EPS, RESULT IS A ZERO
C POLYNOMIAL WITH IDIMX=0 BUT VECTOR X REMAINS INTACT
C
C SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C NONE
C
C METHOD
C DIMENSION OF VECTOR X IS REDUCED BY ONE FOR EACH TRAILING
C COEFFICIENT WITH AN ABSOLUTE VALUE LESS THAN OR EQUAL TO EPS
C
C ..................................................................
C
SUBROUTINE PNORM(X,IDIMX,EPS)
DIMENSION X(1)
C
1 IF(IDIMX) 4,4,2
2 IF(ABS(X(IDIMX))-EPS) 3,3,4
3 IDIMX=IDIMX-1
GO TO 1
4 RETURN
END